package hl.model;
// Generated 2018-4-15 22:16:44 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * TPcOperator generated by hbm2java
 */
@Entity
@Table(name = "t_pc_operator", catalog = "matcha_gym", uniqueConstraints = @UniqueConstraint(columnNames = "ACCOUNT"))
public class TPcOperator implements java.io.Serializable {

	private Long pkPcOperator;
	private TStuff TStuff;
	private String account;
	private String password;
	private Date cdatetime;
	private Date mdatetime;
	private Set<TAppInfo> TAppInfos = new HashSet<TAppInfo>(0);

	public TPcOperator() {
	}

	public TPcOperator(TStuff TStuff) {
		this.TStuff = TStuff;
	}

	public TPcOperator(TStuff TStuff, String account, String password, Date cdatetime, Date mdatetime, Set<TAppInfo> TAppInfos) {
		this.TStuff = TStuff;
		this.account = account;
		this.password = password;
		this.cdatetime = cdatetime;
		this.mdatetime = mdatetime;
		this.TAppInfos = TAppInfos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "PK_PC_OPERATOR", unique = true, nullable = false)
	public Long getPkPcOperator() {
		return this.pkPcOperator;
	}

	public void setPkPcOperator(Long pkPcOperator) {
		this.pkPcOperator = pkPcOperator;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_STUFF", nullable = false)
	public TStuff getTStuff() {
		return this.TStuff;
	}

	public void setTStuff(TStuff TStuff) {
		this.TStuff = TStuff;
	}

	@Column(name = "ACCOUNT", unique = true, length = 20)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "PASSWORD", length = 40)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CDATETIME", length = 19)
	public Date getCdatetime() {
		return this.cdatetime;
	}

	public void setCdatetime(Date cdatetime) {
		this.cdatetime = cdatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MDATETIME", length = 19)
	public Date getMdatetime() {
		return this.mdatetime;
	}

	public void setMdatetime(Date mdatetime) {
		this.mdatetime = mdatetime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TPcOperator")
	public Set<TAppInfo> getTAppInfos() {
		return this.TAppInfos;
	}

	public void setTAppInfos(Set<TAppInfo> TAppInfos) {
		this.TAppInfos = TAppInfos;
	}

}
